package com.freecloud.whispered;

import com.freecloud.framework.repository.BaseRepositoryFactoryBean;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

/**
 * @Author: maomao
 * @Date: 2019-08-15 18:32
 */
@SpringBootApplication
@ComponentScan(basePackages = {"com.freecloud.*"})
@EnableJpaRepositories(basePackages = {"com.freecloud.*"},
        repositoryFactoryBeanClass = BaseRepositoryFactoryBean.class)//指定自己的工厂类
@EntityScan(basePackages = "com.freecloud.whispered.*")
@EnableFeignClients(basePackages = "com.freecloud.whispered.*")
@EnableDiscoveryClient(autoRegister = false)
@EnableCaching // 启动缓存
public class AllOneBootstrap {
    public static void main(String[] args) {
        SpringApplication.run(AllOneBootstrap.class, args);
    }
}
